package com.ruoqing.log.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoqing.core.domain.rqlog.LogEntity;
import com.ruoqing.log.service.AsyncLogService;
import com.ruoqing.log.service.BaseLogService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
	* @author YaoXian
	* @title: AsyncLogService
	* @projectName ruoxi-blog
	* @description: 若兮微服务 - 通用模块 - 日志模块 - 异步执行记录日志操作
	* @date 2020-12-06 23:04
	*/
@RestController
public class AsyncLogServiceImpl implements AsyncLogService {
		
		@Resource
		private BaseLogService baseLogService;
		
		@Async
		public void asyncSaveLog(LogEntity logEntity){
			baseLogService.saveBaseLog(logEntity);
		}
		
		public Page<LogEntity> selectLogByPage(Integer currentPage, Integer pageSize) {
				return baseLogService.selectLogByPage(currentPage,pageSize);
		}
		
		public Integer deleteBaseLog(Integer logId) {
			
				return baseLogService.deleteBaseLog(logId);
		}
}
